Skip to content

feat: z/OSMF JWT Preflight Check#4531

Open
hrishikesh-nalawade wants to merge 12 commits intov3.x.xfrom
hrishikesh-nalawade/GH4526/jwt-pre-flight-check
Open

feat: z/OSMF JWT Preflight Check#4531
hrishikesh-nalawade wants to merge 12 commits intov3.x.xfrom
hrishikesh-nalawade/GH4526/jwt-pre-flight-check

Conversation

@hrishikesh-nalawade
Copy link
Copy Markdown
Member

@hrishikesh-nalawade hrishikesh-nalawade commented Mar 27, 2026

Description

A Java utility that verifies connectivity to the z/OSMF JWK endpoint before/after starting the Zowe API Mediation Layer. This tool helps diagnose configuration issues early such as incorrect hostnames, unreachable ports, missing certificates, or misconfigured z/OSMF by performing a lightweight HTTP(S) call to the z/OSMF JWK endpoint at /jwt/ibm/api/zOSMFBuilder/jwk

Linked to #4526

Type of change

  • feat: New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • PR title conforms to commit message guideline ## Commit Message Structure Guideline
  • I have commented my code, particularly in hard-to-understand areas. In JS I did provide JSDoc
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • The java tests in the area I was working on leverage @nested annotations
  • Any dependent changes have been merged and published in downstream modules

Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Comment thread gradle/publish.gradle Outdated
'apiml-security-common',
'apiml-tomcat-common',
'certificate-analyser',
'pre-flight-check',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we rename this? There are already some pre-flight checks and some in progress. This name is too general.

For example:
zosmf-jwt-check
jwt-check

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes sure, going with zosmf-jwt-check. Thank You for the suggestion.

Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
@hrishikesh-nalawade hrishikesh-nalawade changed the title feat: JWT Preflight Check feat: z/OSMF JWT Preflight Check Apr 1, 2026
@EvaJavornicka EvaJavornicka moved this from New to In Progress in API Mediation Layer Backlog Management Apr 1, 2026
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
hrishikesh-nalawade and others added 3 commits April 1, 2026 19:57
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
hrishikesh-nalawade and others added 3 commits April 20, 2026 23:13
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
Signed-off-by: hrishikesh-nalawade <hrishikesh.nalawade.17@gmail.com>
* or z/OS SAF keyrings. Supports PKCS12, JKS, and {@code safkeyring://} URIs.
*/
@SuppressWarnings("squid:S106")
public class Stores {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this class more or less the same as for the certificate analyzer?

Would it be possible to extract it to some of the libraries?

* Thrown when keystore or truststore initialization fails
* (e.g. missing file, wrong password, invalid keyring format).
*/
public class StoresNotInitializeException extends RuntimeException {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also lives in certificate-analyzer, if it is used in both it probably should go to some common module.

* </ul>
*/
@SuppressWarnings("squid:S106")
public class SSLContextFactory {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as Stores and StoresNotInitializeException, does it make sense to duplicate the code instead of having it in a shared library?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

4 participants